package org.infoset.xml;

import java.net.*;

/**
 * This interface represents an XML document.  It must contain one and
 * only one child element that is the document element.
 * @author <a href="mailto:alex@milowski.com">R. Alexander Milowski</a>
 */

public interface Document extends Parent,Location {

   /**
    * Create the document element with the specified name.
    * @param name The name to use for the document element.
    * @return An instance of Element which represents the document element created.
    */
   Element createDocumentElement(Name name);

   /**
    * Create the document element with the specified name.
    * @param localName The name to use for the document element.
    * @return An instance of Element which represents the document element created.
    */
   Element createDocumentElement(String localName);

   /**
    * Returns the document element.
    */
   Element getDocumentElement();


   /**
    * Returns an element with a specified id.
    */
   Element getElementWithId(String id);
   
   String getVersion();
   void setVersion(String value);
   
   String getEncoding();
   void setEncoding(String value);
   
   boolean isStandalone();
   void setStandalone(boolean flag);
   
}
